def func():
    a = int(input())
    for i in range(a):
        for j in range(i,a):
            if i==0:
                print((j+2)*(j+1)//2,end=" ")
            else:
                print(((j + 2) * (j + 1) // 2)-i, end=" ")
        print("")

if __name__ == '__main__':
    func()
    """
    1 3 6 10
    2 5 9
    4 8
    7
    """